package com.cjm.one.model.order.dto;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
public class TimeRange {
    private LocalDateTime startTime;  // 原字段名为startTime
    private LocalDateTime endTime;     // 原字段名为endTime

    public LocalDateTime getBeginTime() { return startTime; }
    public LocalDateTime getEndTime() { return endTime; }
    
    // 支持链式调用
    public TimeRange start(LocalDateTime start) {
        this.startTime = start;
        return this;
    }
    
    public TimeRange end(LocalDateTime end) {
        this.endTime = end;
        return this;
    }
}